
/**
 * 常量.. 
 */

var _pickerSelectDates = {
	disabledDate(time) {
		return time.getTime() > Date.now();
	},
    shortcuts: [
	{
  		text: dateLabel.today,
      	onClick(picker) {
            const start = new Date(new Date().Format('yyyy-MM-dd') + ' 00:00:00') ;
            const end = new Date();
            picker.$emit('pick', [start, end]);
      	}
	},{
  		text: dateLabel.nearlyAWeek,
      	onClick(picker) {
    		const end = new Date();
            const start = new Date();
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
            picker.$emit('pick', [start, end]);
      	}
	},{
  		text: dateLabel.nearlyAMonth,
      	onClick(picker) {
            const end = new Date();
            const start = new Date();
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
            picker.$emit('pick', [start, end]);
  		}
	},{
  		text: dateLabel.nearlyThreeMonth,
      	onClick(picker) {
            const end = new Date();
            const start = new Date();
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
            picker.$emit('pick', [start, end]);
      	}
	}]
}


var _pickerSelectAllDates = {
	    shortcuts: [
		{
	  		text: dateLabel.today,
	      	onClick(picker) {
	            const start = new Date(new Date().Format('yyyy-MM-dd') + ' 00:00:00') ;
	            const end = new Date();
	            picker.$emit('pick', [start, end]);
	      	}
		},{
	  		text: dateLabel.nearlyAWeek,
	      	onClick(picker) {
	    		const end = new Date();
	            const start = new Date();
	            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
	            picker.$emit('pick', [start, end]);
	      	}
		},{
	  		text: dateLabel.nearlyAMonth,
	      	onClick(picker) {
	            const end = new Date();
	            const start = new Date();
	            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
	            picker.$emit('pick', [start, end]);
	  		}
		},{
	  		text: dateLabel.nearlyThreeMonth,
	      	onClick(picker) {
	            const end = new Date();
	            const start = new Date();
	            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
	            picker.$emit('pick', [start, end]);
	      	}
		}]
	}




